<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Developer: Subha Sundar Das (subhasundar.das@gmail.com)
 * Description of cms
 */
class Cms extends MY_Controller {

    function cms() {
        parent :: __construct();
        $this->load->model('pickup_model');
        $this->load->model('member_model');
        $this->load->model('management_model');
        $this->load->model('requirement_model');
        $this->load->model('location_model');
        $this->load->model('terms_model');
        $this->load->model('features_model');
        $this->load->model('specification_model');
    }

    function _remap() {
        $c = $this->uri->segment(3);
        $cms=$this->_get_cms($c);
        //print_r($cms);
    }
    
    function _get_cms($id) {
        $sql = "select * from cms where id=$id";
        $query = $this->db->query($sql);
        $row = $query->row();
        $data['cms']['info']=$row;
        
        
        $this->template->set_metadata('keywords',$row->meta_keyword );
        $this->template->set_metadata('description', $row->meta_description);
        
        $this->template->title($row->meta_title)
                    ->set_partial('header', 'header/header')
                    ->set_partial('customer_care', 'sidebar/customer_care')
                    ->set_partial('social_share', 'sidebar/social_share')
                    ->set_partial('search_reviews', 'sidebar/search_reviews')
                    ->set_partial('recent_news', 'sidebar/recent_news')
                    ->set_partial('recent_reviews', 'sidebar/recent_reviews')
                    ->set_partial('footer', 'footer/footer')
                    ->build('pages/cms',$data);
    }

}

?>
